<!--内容开始-->
<section class="content">
    <div class="search">
        <form class="form-inline" action="{:url('Auth/adminList')}" data-pjax>
            <e>数据库中共有 <b>{$result.tableNum}</b> 张表，共计 <b>{$result.total}</b></e>
            <input class="btn btn-flat btn-primary m_10" id="backUp" type="button" value="备份">
            <input class="btn btn-flat btn-success m_10" id="optimize" type="button" value="优化">
            <input class="btn btn-flat btn-warning m_10" id="repair" type="button" value="修复">
        </form>
    </div>
    <!--数据表开始-->
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-bordered table-hover">
                            <tr>
                                <th class="t_c"><input type="checkbox" id="check"></th>
                                <th class="t_c">数据库表</th>
                                <th class="t_c">记录条数</th>
                                <th class="t_c">占用空间</th>
                                <th class="t_c">类型</th>
                                <th class="t_c">编码</th>
                                <th class="t_c">创建时间</th>
                                <th class="t_c">说明</th>
                            </tr>
                            {volist name='result.data' id='list' empty="$empty"}
                            <tr>
                                <td class="t_c"><input type="checkbox" name="key[]" value="{$list.name}"></td>
                                <td class="t_c">{$list.name}</td>
                                <td class="t_c">{$list.rows}</td>
                                <td class="t_c">{$list.size}</td>
                                <td class="t_c">{$list.engine}</td>
                                <td class="t_c">{$list.collation}</td>
                                <td class="t_c">{$list.create_time}</td>
                                <td class="t_c">{$list.comment}</td>
                            </tr>
                            {/volist}
                        </table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
        </div>
    </div>
    <!--数据表结束-->
</section>
<!--内容结束-->

<script>
    //备份
    $("#backUp").click(function () {
        var url = "{:url('backup')}";
        dbBackup(url);
    })
    //优化
    $("#optimize").click(function () {
        var url = "{:url('optimize')}";
        dbBackup(url);
    })
    //修复
    $("#repair").click(function () {
        var url = "{:url('repair')}";
        dbBackup(url);
    })
</script>
